<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=10"/>
    <title><spring:message code="login.page_title"/></title>
    <link
            href="../../resources/extjs4/resources/ext-theme-neptune/ext-theme-neptune-all.css"
            type="text/css" rel="stylesheet"/>
    <link
            href="../../static/admin/css/base.css"
            type="text/css" rel="stylesheet"/>
    <script> var BASE_URL = "${basePath}";</script>

    <script type="text/javascript">
        if (self != top) {
            top.location.href = "../../index.jsp";
        }
    </script>
    <style>
        html {
            height: 100%;
        }

        body {
            height: 100%;
            overflow: hidden;
        }

        @-webkit-keyframes shineWhite {
            from {
                -webkit-box-shadow: 0 0px 5px #FEE100;
            }
            50% {
                -webkit-box-shadow: 0 0px 20px #ffffff;
            }
            to {
                -webkit-box-shadow: 0 0px 5px #FEE100;
            }

        }

        #loginDialog {
            -webkit-animation-name: shineWhite;
            -webkit-animation-duration: 2s;
            -webkit-animation-iteration-count: infinite;
        }

        #loginDialog {
            margin-top: 20px;
            height: 300px;
            overflow: hidden;
            /*opacity: 0.3;*/
            border: solid 1px #fff;
            background: rgba(255, 255, 255, 1); /*前三个参数为rgb颜色，第四个参数为透明度*/
            filter: progid:DXImageTransform.Microsoft.gradient(startcolorstr=#7F000000, endcolorstr=#7F000000);
        }

        #loginDialogForm {
            margin: 30px;
            padding-top: 30px;
            height: 200px;
        }

        .loginBtn {
            text-align: center;
        }

        .loginBtn a.button {
            display: inline-block;
            font-size: 14px;
            text-decoration: none !important;
            font-family: Helvetica, Arial, sans serif;
            padding: 8px 12px;
            border-radius: 3px;
            -moz-border-radius: 3px;
            box-shadow: inset 0px 0px 2px #fff;
            -o-box-shadow: inset 0px 0px 2px #fff;
            -webkit-box-shadow: inset 0px 0px 2px #fff;
            -moz-box-shadow: inset 0px 0px 2px #fff;
            color: #986a39;
            border: 1px solid #e6b650;
            background-image: -moz-linear-gradient(#ffd974, #febf4d);
            background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#febf4d), to(#ffd974));
            background-image: -webkit-linear-gradient(#ffd974, #febf4d);
            background-image: -o-linear-gradient(#ffd974, #febf4d);
            text-shadow: 1px 1px 1px #fbe5ac;
            background-color: #febf4d;
            padding: 14px 28px;
            width: 120px;
            margin-top: 10px;
            cursor: pointer;

        }

        .loginBtn .button:hover {
            border: 1px solid #c1913d;
            background-image: -moz-linear-gradient(#febf4d, #ffd974);
            background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#ffd974), to(#febf4d));
            background-image: -webkit-linear-gradient(#febf4d, #ffd974);
            background-image: -o-linear-gradient(#febf4d, #ffd974);
            background-color: #ffd974;
        }
    </style>

    <script>
        function login() {
            Ext.getCmp('loginWindow').login();
        }

        function resetPwdWin() {
            Ext.getCmp('loginWindow').resetPwdWin();
        }
    </script>
</head>
<body>
<div style="float:left; height:50%; margin-bottom:-150px;"></div>
<div style="width:760px;margin:0px auto;clear:both; height: 300px;position: relative;">
    <div style="text-align: center;margin-top: 100px;"><img src="../static/admin/images/title.png"/></div>
    <div id="loginDialog">
        <div id="loginDialogForm">


        </div>
    </div>
    <div><a id="oauth_link">授权登录测试</a></div>
</div>
<script type="text/javascript" src="../../resources/extjs4/bootstrap.js"></script>
<script type="text/javascript" src="../../resources/extjs4/locale/ext-lang-zh_CN.js"></script>
<script type="text/javascript" src="../../static/admin/js/common4.js"></script>
<script>
    Ext.onReady(function () {
        var win = new LoginWindow({
            id: 'loginWindow',
            renderTo: 'loginDialogForm'
        }).show();
    });
    document.getElementById('oauth_link').addEventListener('click', function (event) {
        event.stopPropagation();
        event.preventDefault();
        location.href = "/oauth/authorize?client_id=123&response_type=code&redirect_uri=" + encodeURIComponent('http://127.0.0.1:8080/oauth/accessToken?grant_type=authorization_code');
        return false;
    }, false);
</script>

<script src="../../resources/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="../../static/admin/js/login.js"></script>
</body>
</html>

